package com.xinqi.modules.sys.dict.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.sys.dict.domain.DictStageEntity;
import com.xinqi.modules.sys.dict.dto.req.DictStageCreateDTO;
import com.xinqi.modules.sys.dict.dto.req.DictStageUpdateDTO;
import com.xinqi.modules.sys.dict.dto.rsp.DictStageResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

import java.util.List;

/**
 * 字典-学段转换
 *
 * @author: linkai
 * @date: 2023/05/03
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class DictStageConvert {
    public abstract DictStageEntity create(DictStageCreateDTO s);

    public abstract DictStageEntity update(DictStageUpdateDTO s, @MappingTarget DictStageEntity t);

    public abstract DictStageEntity update(DictStageUpdateDTO s);

    public abstract DictStageResultDTO convert(DictStageEntity s);

    public abstract List<DictStageResultDTO> convert(List<DictStageEntity> list);

}
